package com.chixing.day20_annotation_jdk8.work;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class ArrayDemo {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1, 2, 3, 4, 5);
        List<Integer> a = list.stream().map((cost)->cost*cost).collect(Collectors.toList());
        a.forEach(System.out::println);
    }
}
